package moc.egg;
import moc.compiler.*;
import moc.tds.*;
import moc.type.*;
import moc.gc.*;
import java.util.*;
import mg.egg.eggc.runtime.libjava.lex.*;
import mg.egg.eggc.runtime.libjava.*;
import mg.egg.eggc.runtime.libjava.messages.*;
import mg.egg.eggc.runtime.libjava.problem.IProblem;
import java.util.Vector;
public class S_PARFS_MOC {
LEX_MOC scanner;
  S_PARFS_MOC() {
    }
  S_PARFS_MOC(LEX_MOC scanner, boolean eval) {
    this.scanner = scanner;
    this.att_eval = eval;
    this.att_scanner = scanner;
    }
int [] sync= new int[0];
  SIGNATURE att_hsignature;
  int att_depLB;
  int att_hdepLB;
  boolean att_eval;
  IMachine att_machine;
  SIGNATURE att_signature;
  LEX_MOC att_scanner;
  private void regle6() throws Exception {

    //declaration
    S_PARF_MOC x_3 = new S_PARF_MOC(scanner,att_eval) ;
    S_PARFSX_MOC x_5 = new S_PARFSX_MOC(scanner,att_eval) ;
    //appel
if  (att_eval)      action_auto_inh_6(x_3, x_5);
if  (att_eval)      action_hsig_6(x_3, x_5);
    x_3.analyser() ;
if  (att_eval)      action_hsig1_6(x_3, x_5);
    x_5.analyser() ;
if  (att_eval)      action_sig_6(x_3, x_5);
  }
  private void regle5() throws Exception {

    //declaration
    //appel
if  (att_eval)      action_sig_5();
  }
private void action_auto_inh_6(S_PARF_MOC x_3, S_PARFSX_MOC x_5) throws Exception {
try {
// instructions
x_3.att_hdepLB=this.att_hdepLB;
x_3.att_machine=this.att_machine;
x_5.att_machine=this.att_machine;
}catch(RuntimeException e) {       att_scanner._interrompre(IProblem.Internal,att_scanner.getBeginLine(),ICoreMessages.id_EGG_runtime_error, CoreMessages.EGG_runtime_error,new Object[] { "MOC", "#auto_inh","PARFS -> #hsig PARF #hsig1 PARFSX #sig ;"});
}
  }
private void action_sig_5() throws Exception {
try {
// instructions
this.att_signature=this.att_hsignature;
this.att_depLB=this.att_hdepLB;
}catch(RuntimeException e) {       att_scanner._interrompre(IProblem.Internal,att_scanner.getBeginLine(),ICoreMessages.id_EGG_runtime_error, CoreMessages.EGG_runtime_error,new Object[] { "MOC", "#sig","PARFS -> #sig ;"});
}
  }
private void action_hsig1_6(S_PARF_MOC x_3, S_PARFSX_MOC x_5) throws Exception {
try {
// instructions
x_5.att_hsignature=x_3.att_signature;
x_5.att_hdepLB=x_3.att_depLB;
}catch(RuntimeException e) {       att_scanner._interrompre(IProblem.Internal,att_scanner.getBeginLine(),ICoreMessages.id_EGG_runtime_error, CoreMessages.EGG_runtime_error,new Object[] { "MOC", "#hsig1","PARFS -> #hsig PARF #hsig1 PARFSX #sig ;"});
}
  }
private void action_sig_6(S_PARF_MOC x_3, S_PARFSX_MOC x_5) throws Exception {
try {
// instructions
this.att_signature=x_5.att_signature;
this.att_depLB=x_5.att_depLB;
}catch(RuntimeException e) {       att_scanner._interrompre(IProblem.Internal,att_scanner.getBeginLine(),ICoreMessages.id_EGG_runtime_error, CoreMessages.EGG_runtime_error,new Object[] { "MOC", "#sig","PARFS -> #hsig PARF #hsig1 PARFSX #sig ;"});
}
  }
private void action_hsig_6(S_PARF_MOC x_3, S_PARFSX_MOC x_5) throws Exception {
try {
// instructions
x_3.att_hsignature=this.att_hsignature;
}catch(RuntimeException e) {       att_scanner._interrompre(IProblem.Internal,att_scanner.getBeginLine(),ICoreMessages.id_EGG_runtime_error, CoreMessages.EGG_runtime_error,new Object[] { "MOC", "#hsig","PARFS -> #hsig PARF #hsig1 PARFSX #sig ;"});
}
  }
  public void analyser () throws Exception {
    scanner.lit ( 1 ) ;
    switch ( scanner.fenetre[0].code ) {
      case LEX_MOC.token_parf : // 3853
        regle5 () ;
      break ;
      case LEX_MOC.token_void : // 3862
        regle6 () ;
      break ;
      case LEX_MOC.token_int : // 3864
        regle6 () ;
      break ;
      case LEX_MOC.token_char : // 3865
        regle6 () ;
      break ;
      default :
               scanner._interrompre(IProblem.Syntax, scanner.getBeginLine(), IMOCMessages.id_MOC_unexpected_token,MOCMessages.MOC_unexpected_token,new String[]{scanner.fenetre[0].getNom()});
    }
  }
  }
